<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../../commons/taglibs.jsp"%>
<%@ include file="../../commons/list.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta charset="utf-8">
  <title>汽车玻璃后视镜详情</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <style type="text/css">
  	.layui-input{
  		width: 200px;
  	}
  	.layui-form-pane .layui-form-label{
  		width: 160px;
  	}
  </style>
</head>

<body>
<div>
	<div style="padding: 100px;padding-top: 0px">
		<form class="layui-form layui-form-pane"  action="">
			<input type="hidden" id='entityId' name='entityId' value="${carDetailGlassMirror.id }">
			<input type="hidden" name='carmodelid' value="${carmodelid }">
			
	   		 <div class="layui-form-item">
			     <label class="layui-form-label">前/后电动车窗</label>
			     <div class="layui-input-inline">
			         <input type="text" name="electricwindow" id='electricwindow' placeholder="请输入前/后电动车窗" value="${carDetailGlassMirror.electricwindow }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">车窗防夹手功能</label>
			     <div class="layui-input-inline">
			         <input type="text" name="preventclampshand" id='preventclampshand' placeholder="请输入车窗防夹手功能" value="${carDetailGlassMirror.preventclampshand }" class="layui-input">
			     </div>
			 </div>
			 
			  <div class="layui-form-item">
			     <label class="layui-form-label">防紫外线/隔热玻璃</label>
			     <div class="layui-input-inline">
			         <input type="text" name="ultravioletrays" id='ultravioletrays' placeholder="请输入防紫外线/隔热玻璃" value="${carDetailGlassMirror.ultravioletrays }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">后视镜电动调节</label>
			     <div class="layui-input-inline">
			         <input type="text" name="mirrorelectricadiustment" id='mirrorelectricadiustment' placeholder="请输入后视镜电动调节" value="${carDetailGlassMirror.mirrorelectricadiustment }" class="layui-input">
			     </div>
			 </div>
			 
			 <div class="layui-form-item">
			     <label class="layui-form-label">后视镜加热</label>
			     <div class="layui-input-inline">
			         <input type="text" name="rearviewmirrorheating" id='rearviewmirrorheating' placeholder="请输入后视镜加热" value="${carDetailGlassMirror.rearviewmirrorheating }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">内/外后视镜自动防眩目</label>
			     <div class="layui-input-inline">
			         <input type="text" name="antigtlare" id='antigtlare' placeholder="请输入内/外后视镜自动防眩目" value="${carDetailGlassMirror.antigtlare }" class="layui-input">
			     </div>
			 </div>
			 
			 <div class="layui-form-item">
			     <label class="layui-form-label">后视镜电动折叠</label>
			     <div class="layui-input-inline">
			         <input type="text" name="fold" id='fold' placeholder="请输入后视镜电动折叠" value="${carDetailGlassMirror.fold }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">后视镜记忆</label>
			     <div class="layui-input-inline">
			         <input type="text" name="memory" id='memory' placeholder="请输入后视镜记忆" value="${carDetailGlassMirror.memory }" class="layui-input">
			     </div>
			 </div>
			 
			 <div class="layui-form-item">
			     <label class="layui-form-label">后风挡遮阳帘</label>
			     <div class="layui-input-inline">
			         <input type="text" name="yangcurtain" id='yangcurtain' placeholder="请输入后风挡遮阳帘" value="${carDetailGlassMirror.yangcurtain }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">后排侧隐私玻璃</label>
			     <div class="layui-input-inline">
			         <input type="text" name="privacyglass" id='privacyglass' placeholder="请输入后排侧隐私玻璃" value="${carDetailGlassMirror.privacyglass }" class="layui-input">
			     </div>
			 </div>
			 
			 <div class="layui-form-item">
			     <label class="layui-form-label">遮阳板化妆镜</label>
			     <div class="layui-input-inline">
			         <input type="text" name="cosmeticmirror" id='cosmeticmirror' placeholder="请输入遮阳板化妆镜" value="${carDetailGlassMirror.cosmeticmirror }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">后雨刷</label>
			     <div class="layui-input-inline">
			         <input type="text" name="rearwiper" id='rearwiper' placeholder="请输入后雨刷" value="${carDetailGlassMirror.rearwiper }" class="layui-input">
			     </div>
			 </div>
			 
			 <div class="layui-form-item">
			     <label class="layui-form-label">感应雨刷 </label>
			     <div class="layui-input-inline">
			         <input type="text" name="sensingwipers" id='sensingwipers' placeholder="请输入感应雨刷 " value="${carDetailGlassMirror.sensingwipers }" class="layui-input">
			     </div>
			 </div>
			 
			 <div class="layui-form-item" style="width: 85%;padding-left: 200px;padding-top: 30px">
			    <div class="layui-input-block">
			      <button class="layui-btn" id='tjsub' lay-submit lay-filter="formDemo">立即提交</button>
		    	</div>
		  	</div>
		</form>
	</div>
 </div>
<script>

layui.use(['form'], function () {
    var $ = layui.jquery
        ,form = layui.form
        ,layer= layui.layer;
    
     var form = layui.form;
	  
	  //监听提交
	  form.on('submit(formDemo)', function(data){
		  var field = JSON.parse(JSON.stringify(data.field));
		  var img = field.img;
		  field.img = $("#imgAddress").val();
	  	//提交成功后禁用按钮
		$("#tjsub").css("pointer-events","none"); 
	    //layer.msg(JSON.stringify(data.field));
	    $.post("<%=basePath%>/controller/carDetailGlassMirror/save",field,function (data){
	    	if(data == '0'){
	    		$("#tjsub").css("pointer-events","auto");
	    		layer.msg('提交成功', {time:1000}); 
	    		setTimeout("window.location.reload();",1500); 
	    	}else{
	    		$("#tjsub").css("pointer-events","auto");
	    		layer.msg('提交失败', {time:1000}); 
	    	}
	    })
	    return false;
	  });
    
});

</script>
</body>
</html>
